<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input type="button" value="跳转" onclick="testLocation()">
    
    <script>
        function testLocation() {
            //location表示地址栏对象，可以实现页面跳转和刷新
            //window.location.href = "https://www.baidu.com";
            //location = "https://www.baidu.com";
            location.reload();
        }
    </script>
</body>
</html>